package cn.csg.ams.collect2.poptopics.infrastructure.utils;

import cn.hutool.core.date.DateTime;

import java.util.Date;

public class DateUtil {


    public static DateTime parse(CharSequence dateStr, String format) {
        if (dateStr == null) {
            return null;
        }

        return new DateTime(dateStr, format);
    }


    public static String format(Date date, String format) {
        return cn.hutool.core.date.DateUtil.format(date, format);
    }

    public static DateTime offsetDay(Date date, int offset) {
        return cn.hutool.core.date.DateUtil.offsetDay(date, offset);
    }
}
